package com.ruima.study.arithmetic.law;

import java.util.ArrayList;
import java.util.List;

/**
 * <p>
 * <p></p>
 * <p>
 * <p>Copyright (c) 2024/11/22 11:11, 科大讯飞 All Rights Reserve</p>
 *
 * @author ruima6
 * @version [V1.0]
 */
public class Demo3 {


    public static void main(String[] args) {
        int[] ints = divingBoard(1, 2, 3);
        for (int anInt : ints) {
            System.out.println(anInt);
        }


    }
    public static int[]divingBoard(int shorter,int longer,int k){
        List<Integer> list = new ArrayList<>();
        for (int i = k; i >= 0 ; i--) {
            list.add(shorter * i + longer * (k-i));
        }
        return list.stream().mapToInt(Integer::intValue).toArray();
    }
}
